package com.seckill.act.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.seckill.act.pojo.Activity;
import com.seckill.act.pojo.SkuAct;
import com.seckill.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

/**
 * @Author：
 * @Description：
 ***/
@FeignClient(value = "seckill-act",path = "/skuAct")
public interface SkuActFeign {

    /**
     *根据时间查询
     */
    @DeleteMapping(value = "/del/{aid}/{sid}")
    Result delByASId(@PathVariable(value = "aid")String aid,@PathVariable(value = "sid")String sid);

    /**
     * 根据ID查找
     * @param id
     * @return
     */
    @GetMapping(value = "/findSkuById/{id}")
    Result<List<String>> findSkuById(@PathVariable(value = "id")String id);


    /***
     * SkuAct分页条件搜索实现
     * @param page
     * @param size
     * @return
     */
    @PostMapping(value = "/search/{acid}/{page}/{size}" )
    Result<Page<SkuAct>> findPageByActId(@PathVariable(value = "acid")String acid, @PathVariable  int page, @PathVariable  int size);
}
